package com.zuul.gateway.config;

import org.springframework.context.annotation.Bean;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * create by yongli on 2021-10-08 17:41
 */

public class SimServiceConfigure implements WebMvcConfigurer {

    @Bean
    public HandlerInterceptor guardInterceptor() {
        return new GuardInterceptor();
    }

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(guardInterceptor());
    }
}
